<?php

class String
{
	public function format($text)
	{
		$new_text = strip_tags($text);
		return $new_text;
	}
	
	public static function endsWithSlash($string)
	{
		return String::endsWith($string, '/');
	}
	
	public static function endsWith($string, $end)
	{
		$s_pos = strrpos($string, $end);
		if($s_pos === strlen($string) - strlen($end))
			return true;
		return false;
	}
	
	public static function startsWith($string, $start)
	{
		$s_pos = strrpos($string, $start);
		if($s_pos === 0)
			return true;
		return false;
	}
	
	public static function toUpperCase($string, $encoding = 'utf8')
	{
		return mb_strtoupper($string, $encoding);
	}
}

?>